function GetQueryString(name){
    var reg = new RegExp("(^|&)"+ name +"=([^&]*)(&|$)");
    var r = window.location.search.substr(1).match(reg);
    if(r!=null)return  unescape(r[2]); return null;
}
function switchState(state){
    result='';
    switch (parseInt(state)) {
        case 0:
            result+='发电';
            break;
        case 1:
            result+='待机';
            break;
        case 2:
            result+='停机';
            break;
        case 3:
            result+='限电';
            break;
        case 4:
            result+='限停';
            break;
        case 5:
            result+='中断';
            break;
        case 6:
            result+='故障';
            break;
        default:
            result+='未知';
            break;
    }     
    return result;       
}